<template>
    <div class="stateBar" :class="{ android: isAndroid, ios: isIOS, ipx: isIPX }" :style="{ backgroundColor: bgColor }">
        <!-- Empty -->
    </div>
</template>

<script>
export default {
    name: 'stateBar',
    props: {
        bgColor: {
            type: String,
            default: 'white'
        }
    },
    data() {
        return {
            isAndroid: false,
            isIOS: false,
            isIPX: false
        };
    },
    beforeMount() {
        this.isAndroid = window.isClient && window.isAndroid;
        if (window.isClient && !window.isAndroid) {
            this.isIOS = window.isIOS;
            this.isIPX = window.isIPX;
        }
    }
};
</script>

<style lang="scss" scoped>
@import '@/styles/index.scss';

.stateBar {
    &.android {
        height: $androidStateBar;
    }
    &.ios {
        height: $iOSStateBar;
    }
    &.ipx {
        height: $iPXStateBar;
    }
}
</style>
